<template>
	<view class="home_body" @click="gotoDetails">
		<view class="flex1"><image :src="items.courseImg" mode="widthFix" style="height: 90%;width: 100%;"></image></view>
		<view class="flex1">
			<view style="font-size: 30rpx;margin-bottom: 10rpx;">{{ items.courseName }}</view>
			<view class="txt_body">
				<view>课程简介:{{ items.courseExplain }}</view>
				<view style="margin-top: 30rpx;color: #ff9966;font-size: 30rpx;font-weight: 600;">￥{{ items.price }}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		items: {
			type: Object,
			default: () => []
		},
	},
	methods:{
		gotoDetails(){
			console.log('-----')
			this.$u.route({
				url:'../pages/course/c_details'
			})
		}
	}
};
</script>

<style>
.home_body {
	display: flex;
	align-items: center;
	padding: 30rpx;
	> view {
		&:nth-child(1) {
			height: 100%;
			display: flex;
			align-items: center;
		}
	}
}
.txt_body {
	font-size: 22rpx;
	margin-top: 10rpx;
	color: #999999;
}
.flex1 {
	flex: 1;
	margin-right: 30rpx;
}
</style>
